package com.common.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.common.constant.vaild.VaildConstant;

import javax.validation.constraints.NotNull;
import java.util.Date;
@TableName(value ="sys_point")
public class Point {
    /**
    * 主键id
    */
    @TableId
    private String id;

    /**
    * 用户id
    */
    @NotNull(message = VaildConstant.MESSAGE_ID_NULL)
    private Long userId;

    /**
    * 积分值
    */
    @NotNull(message = VaildConstant.MESSAGE_SCORE_NULL)
    private Long score;

    /**
    * 积分获得来源
    */
    private String scoreDetail;

    /**
    * 积分类型(0代表获得，1代表消耗)
    */
    @NotNull(message = VaildConstant.MESSAGE_TYPE_NULL)
    private String type;

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
    * 创建时间
    */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
    * 更新人
    */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    /**
    * 更新时间
    */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
    * 删除标志（0代表未删除，1代表已删除）
    */
    @TableField(fill = FieldFill.INSERT)
    private Integer delFlag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getScore() {
        return score;
    }

    public void setScore(Long score) {
        this.score = score;
    }

    public String getScoreDetail() {
        return scoreDetail;
    }

    public void setScoreDetail(String scoreDetail) {
        this.scoreDetail = scoreDetail;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
}
